{-# 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.GetUsageForecast
(
GetUsageForecast (..),
newGetUsageForecast,
getUsageForecast_predictionIntervalLevel,
getUsageForecast_filter,
getUsageForecast_timePeriod,
getUsageForecast_metric,
getUsageForecast_granularity,
GetUsageForecastResponse (..),
newGetUsageForecastResponse,
getUsageForecastResponse_forecastResultsByTime,
getUsageForecastResponse_total,
getUsageForecastResponse_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 GetUsageForecast = GetUsageForecast'
{
GetUsageForecast -> Maybe Natural
predictionIntervalLevel :: Prelude.Maybe Prelude.Natural,
GetUsageForecast -> Maybe Expression
filter' :: Prelude.Maybe Expression,
GetUsageForecast -> DateInterval
timePeriod :: DateInterval,
GetUsageForecast -> Metric
metric :: Metric,
GetUsageForecast -> Granularity
granularity :: Granularity
}
deriving (GetUsageForecast -> GetUsageForecast -> Bool
(GetUsageForecast -> GetUsageForecast -> Bool)
-> (GetUsageForecast -> GetUsageForecast -> Bool)
-> Eq GetUsageForecast
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetUsageForecast -> GetUsageForecast -> Bool
$c/= :: GetUsageForecast -> GetUsageForecast -> Bool
== :: GetUsageForecast -> GetUsageForecast -> Bool
$c== :: GetUsageForecast -> GetUsageForecast -> Bool
Prelude.Eq, ReadPrec [GetUsageForecast]
ReadPrec GetUsageForecast
Int -> ReadS GetUsageForecast
ReadS [GetUsageForecast]
(Int -> ReadS GetUsageForecast)
-> ReadS [GetUsageForecast]
-> ReadPrec GetUsageForecast
-> ReadPrec [GetUsageForecast]
-> Read GetUsageForecast
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetUsageForecast]
$creadListPrec :: ReadPrec [GetUsageForecast]
readPrec :: ReadPrec GetUsageForecast
$creadPrec :: ReadPrec GetUsageForecast
readList :: ReadS [GetUsageForecast]
$creadList :: ReadS [GetUsageForecast]
readsPrec :: Int -> ReadS GetUsageForecast
$creadsPrec :: Int -> ReadS GetUsageForecast
Prelude.Read, Int -> GetUsageForecast -> ShowS
[GetUsageForecast] -> ShowS
GetUsageForecast -> String
(Int -> GetUsageForecast -> ShowS)
-> (GetUsageForecast -> String)
-> ([GetUsageForecast] -> ShowS)
-> Show GetUsageForecast
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetUsageForecast] -> ShowS
$cshowList :: [GetUsageForecast] -> ShowS
show :: GetUsageForecast -> String
$cshow :: GetUsageForecast -> String
showsPrec :: Int -> GetUsageForecast -> ShowS
$cshowsPrec :: Int -> GetUsageForecast -> ShowS
Prelude.Show, (forall x. GetUsageForecast -> Rep GetUsageForecast x)
-> (forall x. Rep GetUsageForecast x -> GetUsageForecast)
-> Generic GetUsageForecast
forall x. Rep GetUsageForecast x -> GetUsageForecast
forall x. GetUsageForecast -> Rep GetUsageForecast x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetUsageForecast x -> GetUsageForecast
$cfrom :: forall x. GetUsageForecast -> Rep GetUsageForecast x
Prelude.Generic)
newGetUsageForecast ::
DateInterval ->
Metric ->
Granularity ->
GetUsageForecast
newGetUsageForecast :: DateInterval -> Metric -> Granularity -> GetUsageForecast
newGetUsageForecast
DateInterval
pTimePeriod_
Metric
pMetric_
Granularity
pGranularity_ =
GetUsageForecast' :: Maybe Natural
-> Maybe Expression
-> DateInterval
-> Metric
-> Granularity
-> GetUsageForecast
GetUsageForecast'
{ $sel:predictionIntervalLevel:GetUsageForecast' :: Maybe Natural
predictionIntervalLevel =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:filter':GetUsageForecast' :: Maybe Expression
filter' = Maybe Expression
forall a. Maybe a
Prelude.Nothing,
$sel:timePeriod:GetUsageForecast' :: DateInterval
timePeriod = DateInterval
pTimePeriod_,
$sel:metric:GetUsageForecast' :: Metric
metric = Metric
pMetric_,
$sel:granularity:GetUsageForecast' :: Granularity
granularity = Granularity
pGranularity_
}
getUsageForecast_predictionIntervalLevel :: Lens.Lens' GetUsageForecast (Prelude.Maybe Prelude.Natural)
getUsageForecast_predictionIntervalLevel :: (Maybe Natural -> f (Maybe Natural))
-> GetUsageForecast -> f GetUsageForecast
getUsageForecast_predictionIntervalLevel = (GetUsageForecast -> Maybe Natural)
-> (GetUsageForecast -> Maybe Natural -> GetUsageForecast)
-> Lens
GetUsageForecast GetUsageForecast (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsageForecast' {Maybe Natural
predictionIntervalLevel :: Maybe Natural
$sel:predictionIntervalLevel:GetUsageForecast' :: GetUsageForecast -> Maybe Natural
predictionIntervalLevel} -> Maybe Natural
predictionIntervalLevel) (\s :: GetUsageForecast
s@GetUsageForecast' {} Maybe Natural
a -> GetUsageForecast
s {$sel:predictionIntervalLevel:GetUsageForecast' :: Maybe Natural
predictionIntervalLevel = Maybe Natural
a} :: GetUsageForecast)
getUsageForecast_filter :: Lens.Lens' GetUsageForecast (Prelude.Maybe Expression)
getUsageForecast_filter :: (Maybe Expression -> f (Maybe Expression))
-> GetUsageForecast -> f GetUsageForecast
getUsageForecast_filter = (GetUsageForecast -> Maybe Expression)
-> (GetUsageForecast -> Maybe Expression -> GetUsageForecast)
-> Lens
GetUsageForecast
GetUsageForecast
(Maybe Expression)
(Maybe Expression)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsageForecast' {Maybe Expression
filter' :: Maybe Expression
$sel:filter':GetUsageForecast' :: GetUsageForecast -> Maybe Expression
filter'} -> Maybe Expression
filter') (\s :: GetUsageForecast
s@GetUsageForecast' {} Maybe Expression
a -> GetUsageForecast
s {$sel:filter':GetUsageForecast' :: Maybe Expression
filter' = Maybe Expression
a} :: GetUsageForecast)
getUsageForecast_timePeriod :: Lens.Lens' GetUsageForecast DateInterval
getUsageForecast_timePeriod :: (DateInterval -> f DateInterval)
-> GetUsageForecast -> f GetUsageForecast
getUsageForecast_timePeriod = (GetUsageForecast -> DateInterval)
-> (GetUsageForecast -> DateInterval -> GetUsageForecast)
-> Lens GetUsageForecast GetUsageForecast DateInterval DateInterval
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsageForecast' {DateInterval
timePeriod :: DateInterval
$sel:timePeriod:GetUsageForecast' :: GetUsageForecast -> DateInterval
timePeriod} -> DateInterval
timePeriod) (\s :: GetUsageForecast
s@GetUsageForecast' {} DateInterval
a -> GetUsageForecast
s {$sel:timePeriod:GetUsageForecast' :: DateInterval
timePeriod = DateInterval
a} :: GetUsageForecast)
getUsageForecast_metric :: Lens.Lens' GetUsageForecast Metric
getUsageForecast_metric :: (Metric -> f Metric) -> GetUsageForecast -> f GetUsageForecast
getUsageForecast_metric = (GetUsageForecast -> Metric)
-> (GetUsageForecast -> Metric -> GetUsageForecast)
-> Lens GetUsageForecast GetUsageForecast Metric Metric
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsageForecast' {Metric
metric :: Metric
$sel:metric:GetUsageForecast' :: GetUsageForecast -> Metric
metric} -> Metric
metric) (\s :: GetUsageForecast
s@GetUsageForecast' {} Metric
a -> GetUsageForecast
s {$sel:metric:GetUsageForecast' :: Metric
metric = Metric
a} :: GetUsageForecast)
getUsageForecast_granularity :: Lens.Lens' GetUsageForecast Granularity
getUsageForecast_granularity :: (Granularity -> f Granularity)
-> GetUsageForecast -> f GetUsageForecast
getUsageForecast_granularity = (GetUsageForecast -> Granularity)
-> (GetUsageForecast -> Granularity -> GetUsageForecast)
-> Lens GetUsageForecast GetUsageForecast Granularity Granularity
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsageForecast' {Granularity
granularity :: Granularity
$sel:granularity:GetUsageForecast' :: GetUsageForecast -> Granularity
granularity} -> Granularity
granularity) (\s :: GetUsageForecast
s@GetUsageForecast' {} Granularity
a -> GetUsageForecast
s {$sel:granularity:GetUsageForecast' :: Granularity
granularity = Granularity
a} :: GetUsageForecast)
instance Core.AWSRequest GetUsageForecast where
type
AWSResponse GetUsageForecast =
GetUsageForecastResponse
request :: GetUsageForecast -> Request GetUsageForecast
request = Service -> GetUsageForecast -> Request GetUsageForecast
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetUsageForecast
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetUsageForecast)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetUsageForecast))
-> Logger
-> Service
-> Proxy GetUsageForecast
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetUsageForecast)))
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 -> GetUsageForecastResponse
GetUsageForecastResponse'
(Maybe [ForecastResult]
-> Maybe MetricValue -> Int -> GetUsageForecastResponse)
-> Either String (Maybe [ForecastResult])
-> Either
String (Maybe MetricValue -> Int -> GetUsageForecastResponse)
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 -> GetUsageForecastResponse)
-> Either String (Maybe MetricValue)
-> Either String (Int -> GetUsageForecastResponse)
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 -> GetUsageForecastResponse)
-> Either String Int -> Either String GetUsageForecastResponse
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 GetUsageForecast
instance Prelude.NFData GetUsageForecast
instance Core.ToHeaders GetUsageForecast where
toHeaders :: GetUsageForecast -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetUsageForecast -> 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.GetUsageForecast" ::
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 GetUsageForecast where
toJSON :: GetUsageForecast -> Value
toJSON GetUsageForecast' {Maybe Natural
Maybe Expression
DateInterval
Granularity
Metric
granularity :: Granularity
metric :: Metric
timePeriod :: DateInterval
filter' :: Maybe Expression
predictionIntervalLevel :: Maybe Natural
$sel:granularity:GetUsageForecast' :: GetUsageForecast -> Granularity
$sel:metric:GetUsageForecast' :: GetUsageForecast -> Metric
$sel:timePeriod:GetUsageForecast' :: GetUsageForecast -> DateInterval
$sel:filter':GetUsageForecast' :: GetUsageForecast -> Maybe Expression
$sel:predictionIntervalLevel:GetUsageForecast' :: GetUsageForecast -> 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 GetUsageForecast where
toPath :: GetUsageForecast -> ByteString
toPath = ByteString -> GetUsageForecast -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetUsageForecast where
toQuery :: GetUsageForecast -> QueryString
toQuery = QueryString -> GetUsageForecast -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetUsageForecastResponse = GetUsageForecastResponse'
{
GetUsageForecastResponse -> Maybe [ForecastResult]
forecastResultsByTime :: Prelude.Maybe [ForecastResult],
GetUsageForecastResponse -> Maybe MetricValue
total :: Prelude.Maybe MetricValue,
GetUsageForecastResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetUsageForecastResponse -> GetUsageForecastResponse -> Bool
(GetUsageForecastResponse -> GetUsageForecastResponse -> Bool)
-> (GetUsageForecastResponse -> GetUsageForecastResponse -> Bool)
-> Eq GetUsageForecastResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetUsageForecastResponse -> GetUsageForecastResponse -> Bool
$c/= :: GetUsageForecastResponse -> GetUsageForecastResponse -> Bool
== :: GetUsageForecastResponse -> GetUsageForecastResponse -> Bool
$c== :: GetUsageForecastResponse -> GetUsageForecastResponse -> Bool
Prelude.Eq, ReadPrec [GetUsageForecastResponse]
ReadPrec GetUsageForecastResponse
Int -> ReadS GetUsageForecastResponse
ReadS [GetUsageForecastResponse]
(Int -> ReadS GetUsageForecastResponse)
-> ReadS [GetUsageForecastResponse]
-> ReadPrec GetUsageForecastResponse
-> ReadPrec [GetUsageForecastResponse]
-> Read GetUsageForecastResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetUsageForecastResponse]
$creadListPrec :: ReadPrec [GetUsageForecastResponse]
readPrec :: ReadPrec GetUsageForecastResponse
$creadPrec :: ReadPrec GetUsageForecastResponse
readList :: ReadS [GetUsageForecastResponse]
$creadList :: ReadS [GetUsageForecastResponse]
readsPrec :: Int -> ReadS GetUsageForecastResponse
$creadsPrec :: Int -> ReadS GetUsageForecastResponse
Prelude.Read, Int -> GetUsageForecastResponse -> ShowS
[GetUsageForecastResponse] -> ShowS
GetUsageForecastResponse -> String
(Int -> GetUsageForecastResponse -> ShowS)
-> (GetUsageForecastResponse -> String)
-> ([GetUsageForecastResponse] -> ShowS)
-> Show GetUsageForecastResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetUsageForecastResponse] -> ShowS
$cshowList :: [GetUsageForecastResponse] -> ShowS
show :: GetUsageForecastResponse -> String
$cshow :: GetUsageForecastResponse -> String
showsPrec :: Int -> GetUsageForecastResponse -> ShowS
$cshowsPrec :: Int -> GetUsageForecastResponse -> ShowS
Prelude.Show, (forall x.
GetUsageForecastResponse -> Rep GetUsageForecastResponse x)
-> (forall x.
Rep GetUsageForecastResponse x -> GetUsageForecastResponse)
-> Generic GetUsageForecastResponse
forall x.
Rep GetUsageForecastResponse x -> GetUsageForecastResponse
forall x.
GetUsageForecastResponse -> Rep GetUsageForecastResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetUsageForecastResponse x -> GetUsageForecastResponse
$cfrom :: forall x.
GetUsageForecastResponse -> Rep GetUsageForecastResponse x
Prelude.Generic)
newGetUsageForecastResponse ::
Prelude.Int ->
GetUsageForecastResponse
newGetUsageForecastResponse :: Int -> GetUsageForecastResponse
newGetUsageForecastResponse Int
pHttpStatus_ =
GetUsageForecastResponse' :: Maybe [ForecastResult]
-> Maybe MetricValue -> Int -> GetUsageForecastResponse
GetUsageForecastResponse'
{ $sel:forecastResultsByTime:GetUsageForecastResponse' :: Maybe [ForecastResult]
forecastResultsByTime =
Maybe [ForecastResult]
forall a. Maybe a
Prelude.Nothing,
$sel:total:GetUsageForecastResponse' :: Maybe MetricValue
total = Maybe MetricValue
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetUsageForecastResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getUsageForecastResponse_forecastResultsByTime :: Lens.Lens' GetUsageForecastResponse (Prelude.Maybe [ForecastResult])
getUsageForecastResponse_forecastResultsByTime :: (Maybe [ForecastResult] -> f (Maybe [ForecastResult]))
-> GetUsageForecastResponse -> f GetUsageForecastResponse
getUsageForecastResponse_forecastResultsByTime = (GetUsageForecastResponse -> Maybe [ForecastResult])
-> (GetUsageForecastResponse
-> Maybe [ForecastResult] -> GetUsageForecastResponse)
-> Lens
GetUsageForecastResponse
GetUsageForecastResponse
(Maybe [ForecastResult])
(Maybe [ForecastResult])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsageForecastResponse' {Maybe [ForecastResult]
forecastResultsByTime :: Maybe [ForecastResult]
$sel:forecastResultsByTime:GetUsageForecastResponse' :: GetUsageForecastResponse -> Maybe [ForecastResult]
forecastResultsByTime} -> Maybe [ForecastResult]
forecastResultsByTime) (\s :: GetUsageForecastResponse
s@GetUsageForecastResponse' {} Maybe [ForecastResult]
a -> GetUsageForecastResponse
s {$sel:forecastResultsByTime:GetUsageForecastResponse' :: Maybe [ForecastResult]
forecastResultsByTime = Maybe [ForecastResult]
a} :: GetUsageForecastResponse) ((Maybe [ForecastResult] -> f (Maybe [ForecastResult]))
-> GetUsageForecastResponse -> f GetUsageForecastResponse)
-> ((Maybe [ForecastResult] -> f (Maybe [ForecastResult]))
-> Maybe [ForecastResult] -> f (Maybe [ForecastResult]))
-> (Maybe [ForecastResult] -> f (Maybe [ForecastResult]))
-> GetUsageForecastResponse
-> f GetUsageForecastResponse
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
getUsageForecastResponse_total :: Lens.Lens' GetUsageForecastResponse (Prelude.Maybe MetricValue)
getUsageForecastResponse_total :: (Maybe MetricValue -> f (Maybe MetricValue))
-> GetUsageForecastResponse -> f GetUsageForecastResponse
getUsageForecastResponse_total = (GetUsageForecastResponse -> Maybe MetricValue)
-> (GetUsageForecastResponse
-> Maybe MetricValue -> GetUsageForecastResponse)
-> Lens
GetUsageForecastResponse
GetUsageForecastResponse
(Maybe MetricValue)
(Maybe MetricValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsageForecastResponse' {Maybe MetricValue
total :: Maybe MetricValue
$sel:total:GetUsageForecastResponse' :: GetUsageForecastResponse -> Maybe MetricValue
total} -> Maybe MetricValue
total) (\s :: GetUsageForecastResponse
s@GetUsageForecastResponse' {} Maybe MetricValue
a -> GetUsageForecastResponse
s {$sel:total:GetUsageForecastResponse' :: Maybe MetricValue
total = Maybe MetricValue
a} :: GetUsageForecastResponse)
getUsageForecastResponse_httpStatus :: Lens.Lens' GetUsageForecastResponse Prelude.Int
getUsageForecastResponse_httpStatus :: (Int -> f Int)
-> GetUsageForecastResponse -> f GetUsageForecastResponse
getUsageForecastResponse_httpStatus = (GetUsageForecastResponse -> Int)
-> (GetUsageForecastResponse -> Int -> GetUsageForecastResponse)
-> Lens GetUsageForecastResponse GetUsageForecastResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsageForecastResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetUsageForecastResponse' :: GetUsageForecastResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetUsageForecastResponse
s@GetUsageForecastResponse' {} Int
a -> GetUsageForecastResponse
s {$sel:httpStatus:GetUsageForecastResponse' :: Int
httpStatus = Int
a} :: GetUsageForecastResponse)
instance Prelude.NFData GetUsageForecastResponse