{-# 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.DevOpsGuru.GetCostEstimation
(
GetCostEstimation (..),
newGetCostEstimation,
getCostEstimation_nextToken,
GetCostEstimationResponse (..),
newGetCostEstimationResponse,
getCostEstimationResponse_status,
getCostEstimationResponse_resourceCollection,
getCostEstimationResponse_timeRange,
getCostEstimationResponse_costs,
getCostEstimationResponse_nextToken,
getCostEstimationResponse_totalCost,
getCostEstimationResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.DevOpsGuru.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 GetCostEstimation = GetCostEstimation'
{
GetCostEstimation -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
}
deriving (GetCostEstimation -> GetCostEstimation -> Bool
(GetCostEstimation -> GetCostEstimation -> Bool)
-> (GetCostEstimation -> GetCostEstimation -> Bool)
-> Eq GetCostEstimation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCostEstimation -> GetCostEstimation -> Bool
$c/= :: GetCostEstimation -> GetCostEstimation -> Bool
== :: GetCostEstimation -> GetCostEstimation -> Bool
$c== :: GetCostEstimation -> GetCostEstimation -> Bool
Prelude.Eq, ReadPrec [GetCostEstimation]
ReadPrec GetCostEstimation
Int -> ReadS GetCostEstimation
ReadS [GetCostEstimation]
(Int -> ReadS GetCostEstimation)
-> ReadS [GetCostEstimation]
-> ReadPrec GetCostEstimation
-> ReadPrec [GetCostEstimation]
-> Read GetCostEstimation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCostEstimation]
$creadListPrec :: ReadPrec [GetCostEstimation]
readPrec :: ReadPrec GetCostEstimation
$creadPrec :: ReadPrec GetCostEstimation
readList :: ReadS [GetCostEstimation]
$creadList :: ReadS [GetCostEstimation]
readsPrec :: Int -> ReadS GetCostEstimation
$creadsPrec :: Int -> ReadS GetCostEstimation
Prelude.Read, Int -> GetCostEstimation -> ShowS
[GetCostEstimation] -> ShowS
GetCostEstimation -> String
(Int -> GetCostEstimation -> ShowS)
-> (GetCostEstimation -> String)
-> ([GetCostEstimation] -> ShowS)
-> Show GetCostEstimation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCostEstimation] -> ShowS
$cshowList :: [GetCostEstimation] -> ShowS
show :: GetCostEstimation -> String
$cshow :: GetCostEstimation -> String
showsPrec :: Int -> GetCostEstimation -> ShowS
$cshowsPrec :: Int -> GetCostEstimation -> ShowS
Prelude.Show, (forall x. GetCostEstimation -> Rep GetCostEstimation x)
-> (forall x. Rep GetCostEstimation x -> GetCostEstimation)
-> Generic GetCostEstimation
forall x. Rep GetCostEstimation x -> GetCostEstimation
forall x. GetCostEstimation -> Rep GetCostEstimation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetCostEstimation x -> GetCostEstimation
$cfrom :: forall x. GetCostEstimation -> Rep GetCostEstimation x
Prelude.Generic)
newGetCostEstimation ::
GetCostEstimation
newGetCostEstimation :: GetCostEstimation
newGetCostEstimation =
GetCostEstimation' :: Maybe Text -> GetCostEstimation
GetCostEstimation' {$sel:nextToken:GetCostEstimation' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing}
getCostEstimation_nextToken :: Lens.Lens' GetCostEstimation (Prelude.Maybe Prelude.Text)
getCostEstimation_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetCostEstimation -> f GetCostEstimation
getCostEstimation_nextToken = (GetCostEstimation -> Maybe Text)
-> (GetCostEstimation -> Maybe Text -> GetCostEstimation)
-> Lens
GetCostEstimation GetCostEstimation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostEstimation' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetCostEstimation' :: GetCostEstimation -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetCostEstimation
s@GetCostEstimation' {} Maybe Text
a -> GetCostEstimation
s {$sel:nextToken:GetCostEstimation' :: Maybe Text
nextToken = Maybe Text
a} :: GetCostEstimation)
instance Core.AWSPager GetCostEstimation where
page :: GetCostEstimation
-> AWSResponse GetCostEstimation -> Maybe GetCostEstimation
page GetCostEstimation
rq AWSResponse GetCostEstimation
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetCostEstimation
GetCostEstimationResponse
rs
GetCostEstimationResponse
-> Getting (First Text) GetCostEstimationResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetCostEstimationResponse
-> Const (First Text) GetCostEstimationResponse
Lens' GetCostEstimationResponse (Maybe Text)
getCostEstimationResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetCostEstimationResponse
-> Const (First Text) GetCostEstimationResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetCostEstimationResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe GetCostEstimation
forall a. Maybe a
Prelude.Nothing
| Maybe [ServiceResourceCost] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetCostEstimation
GetCostEstimationResponse
rs
GetCostEstimationResponse
-> Getting
(First [ServiceResourceCost])
GetCostEstimationResponse
[ServiceResourceCost]
-> Maybe [ServiceResourceCost]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ServiceResourceCost]
-> Const
(First [ServiceResourceCost]) (Maybe [ServiceResourceCost]))
-> GetCostEstimationResponse
-> Const (First [ServiceResourceCost]) GetCostEstimationResponse
Lens' GetCostEstimationResponse (Maybe [ServiceResourceCost])
getCostEstimationResponse_costs ((Maybe [ServiceResourceCost]
-> Const
(First [ServiceResourceCost]) (Maybe [ServiceResourceCost]))
-> GetCostEstimationResponse
-> Const (First [ServiceResourceCost]) GetCostEstimationResponse)
-> (([ServiceResourceCost]
-> Const (First [ServiceResourceCost]) [ServiceResourceCost])
-> Maybe [ServiceResourceCost]
-> Const
(First [ServiceResourceCost]) (Maybe [ServiceResourceCost]))
-> Getting
(First [ServiceResourceCost])
GetCostEstimationResponse
[ServiceResourceCost]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ServiceResourceCost]
-> Const (First [ServiceResourceCost]) [ServiceResourceCost])
-> Maybe [ServiceResourceCost]
-> Const
(First [ServiceResourceCost]) (Maybe [ServiceResourceCost])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe GetCostEstimation
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
GetCostEstimation -> Maybe GetCostEstimation
forall a. a -> Maybe a
Prelude.Just (GetCostEstimation -> Maybe GetCostEstimation)
-> GetCostEstimation -> Maybe GetCostEstimation
forall a b. (a -> b) -> a -> b
Prelude.$
GetCostEstimation
rq
GetCostEstimation
-> (GetCostEstimation -> GetCostEstimation) -> GetCostEstimation
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetCostEstimation -> Identity GetCostEstimation
Lens GetCostEstimation GetCostEstimation (Maybe Text) (Maybe Text)
getCostEstimation_nextToken
((Maybe Text -> Identity (Maybe Text))
-> GetCostEstimation -> Identity GetCostEstimation)
-> Maybe Text -> GetCostEstimation -> GetCostEstimation
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetCostEstimation
GetCostEstimationResponse
rs
GetCostEstimationResponse
-> Getting (First Text) GetCostEstimationResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetCostEstimationResponse
-> Const (First Text) GetCostEstimationResponse
Lens' GetCostEstimationResponse (Maybe Text)
getCostEstimationResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetCostEstimationResponse
-> Const (First Text) GetCostEstimationResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetCostEstimationResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest GetCostEstimation where
type
AWSResponse GetCostEstimation =
GetCostEstimationResponse
request :: GetCostEstimation -> Request GetCostEstimation
request = Service -> GetCostEstimation -> Request GetCostEstimation
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy GetCostEstimation
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetCostEstimation)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetCostEstimation))
-> Logger
-> Service
-> Proxy GetCostEstimation
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetCostEstimation)))
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 CostEstimationStatus
-> Maybe CostEstimationResourceCollectionFilter
-> Maybe CostEstimationTimeRange
-> Maybe [ServiceResourceCost]
-> Maybe Text
-> Maybe Double
-> Int
-> GetCostEstimationResponse
GetCostEstimationResponse'
(Maybe CostEstimationStatus
-> Maybe CostEstimationResourceCollectionFilter
-> Maybe CostEstimationTimeRange
-> Maybe [ServiceResourceCost]
-> Maybe Text
-> Maybe Double
-> Int
-> GetCostEstimationResponse)
-> Either String (Maybe CostEstimationStatus)
-> Either
String
(Maybe CostEstimationResourceCollectionFilter
-> Maybe CostEstimationTimeRange
-> Maybe [ServiceResourceCost]
-> Maybe Text
-> Maybe Double
-> Int
-> GetCostEstimationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe CostEstimationStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
Either
String
(Maybe CostEstimationResourceCollectionFilter
-> Maybe CostEstimationTimeRange
-> Maybe [ServiceResourceCost]
-> Maybe Text
-> Maybe Double
-> Int
-> GetCostEstimationResponse)
-> Either String (Maybe CostEstimationResourceCollectionFilter)
-> Either
String
(Maybe CostEstimationTimeRange
-> Maybe [ServiceResourceCost]
-> Maybe Text
-> Maybe Double
-> Int
-> GetCostEstimationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe CostEstimationResourceCollectionFilter)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ResourceCollection")
Either
String
(Maybe CostEstimationTimeRange
-> Maybe [ServiceResourceCost]
-> Maybe Text
-> Maybe Double
-> Int
-> GetCostEstimationResponse)
-> Either String (Maybe CostEstimationTimeRange)
-> Either
String
(Maybe [ServiceResourceCost]
-> Maybe Text -> Maybe Double -> Int -> GetCostEstimationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe CostEstimationTimeRange)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TimeRange")
Either
String
(Maybe [ServiceResourceCost]
-> Maybe Text -> Maybe Double -> Int -> GetCostEstimationResponse)
-> Either String (Maybe [ServiceResourceCost])
-> Either
String
(Maybe Text -> Maybe Double -> Int -> GetCostEstimationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Either String (Maybe (Maybe [ServiceResourceCost]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Costs" Either String (Maybe (Maybe [ServiceResourceCost]))
-> Maybe [ServiceResourceCost]
-> Either String (Maybe [ServiceResourceCost])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ServiceResourceCost]
forall a. Monoid a => a
Prelude.mempty)
Either
String
(Maybe Text -> Maybe Double -> Int -> GetCostEstimationResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Double -> Int -> GetCostEstimationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
Either String (Maybe Double -> Int -> GetCostEstimationResponse)
-> Either String (Maybe Double)
-> Either String (Int -> GetCostEstimationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Double)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TotalCost")
Either String (Int -> GetCostEstimationResponse)
-> Either String Int -> Either String GetCostEstimationResponse
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 GetCostEstimation
instance Prelude.NFData GetCostEstimation
instance Core.ToHeaders GetCostEstimation where
toHeaders :: GetCostEstimation -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetCostEstimation -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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.ToPath GetCostEstimation where
toPath :: GetCostEstimation -> ByteString
toPath = ByteString -> GetCostEstimation -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/cost-estimation"
instance Core.ToQuery GetCostEstimation where
toQuery :: GetCostEstimation -> QueryString
toQuery GetCostEstimation' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetCostEstimation' :: GetCostEstimation -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken]
data GetCostEstimationResponse = GetCostEstimationResponse'
{
GetCostEstimationResponse -> Maybe CostEstimationStatus
status :: Prelude.Maybe CostEstimationStatus,
GetCostEstimationResponse
-> Maybe CostEstimationResourceCollectionFilter
resourceCollection :: Prelude.Maybe CostEstimationResourceCollectionFilter,
GetCostEstimationResponse -> Maybe CostEstimationTimeRange
timeRange :: Prelude.Maybe CostEstimationTimeRange,
GetCostEstimationResponse -> Maybe [ServiceResourceCost]
costs :: Prelude.Maybe [ServiceResourceCost],
GetCostEstimationResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetCostEstimationResponse -> Maybe Double
totalCost :: Prelude.Maybe Prelude.Double,
GetCostEstimationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetCostEstimationResponse -> GetCostEstimationResponse -> Bool
(GetCostEstimationResponse -> GetCostEstimationResponse -> Bool)
-> (GetCostEstimationResponse -> GetCostEstimationResponse -> Bool)
-> Eq GetCostEstimationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCostEstimationResponse -> GetCostEstimationResponse -> Bool
$c/= :: GetCostEstimationResponse -> GetCostEstimationResponse -> Bool
== :: GetCostEstimationResponse -> GetCostEstimationResponse -> Bool
$c== :: GetCostEstimationResponse -> GetCostEstimationResponse -> Bool
Prelude.Eq, ReadPrec [GetCostEstimationResponse]
ReadPrec GetCostEstimationResponse
Int -> ReadS GetCostEstimationResponse
ReadS [GetCostEstimationResponse]
(Int -> ReadS GetCostEstimationResponse)
-> ReadS [GetCostEstimationResponse]
-> ReadPrec GetCostEstimationResponse
-> ReadPrec [GetCostEstimationResponse]
-> Read GetCostEstimationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCostEstimationResponse]
$creadListPrec :: ReadPrec [GetCostEstimationResponse]
readPrec :: ReadPrec GetCostEstimationResponse
$creadPrec :: ReadPrec GetCostEstimationResponse
readList :: ReadS [GetCostEstimationResponse]
$creadList :: ReadS [GetCostEstimationResponse]
readsPrec :: Int -> ReadS GetCostEstimationResponse
$creadsPrec :: Int -> ReadS GetCostEstimationResponse
Prelude.Read, Int -> GetCostEstimationResponse -> ShowS
[GetCostEstimationResponse] -> ShowS
GetCostEstimationResponse -> String
(Int -> GetCostEstimationResponse -> ShowS)
-> (GetCostEstimationResponse -> String)
-> ([GetCostEstimationResponse] -> ShowS)
-> Show GetCostEstimationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCostEstimationResponse] -> ShowS
$cshowList :: [GetCostEstimationResponse] -> ShowS
show :: GetCostEstimationResponse -> String
$cshow :: GetCostEstimationResponse -> String
showsPrec :: Int -> GetCostEstimationResponse -> ShowS
$cshowsPrec :: Int -> GetCostEstimationResponse -> ShowS
Prelude.Show, (forall x.
GetCostEstimationResponse -> Rep GetCostEstimationResponse x)
-> (forall x.
Rep GetCostEstimationResponse x -> GetCostEstimationResponse)
-> Generic GetCostEstimationResponse
forall x.
Rep GetCostEstimationResponse x -> GetCostEstimationResponse
forall x.
GetCostEstimationResponse -> Rep GetCostEstimationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetCostEstimationResponse x -> GetCostEstimationResponse
$cfrom :: forall x.
GetCostEstimationResponse -> Rep GetCostEstimationResponse x
Prelude.Generic)
newGetCostEstimationResponse ::
Prelude.Int ->
GetCostEstimationResponse
newGetCostEstimationResponse :: Int -> GetCostEstimationResponse
newGetCostEstimationResponse Int
pHttpStatus_ =
GetCostEstimationResponse' :: Maybe CostEstimationStatus
-> Maybe CostEstimationResourceCollectionFilter
-> Maybe CostEstimationTimeRange
-> Maybe [ServiceResourceCost]
-> Maybe Text
-> Maybe Double
-> Int
-> GetCostEstimationResponse
GetCostEstimationResponse'
{ $sel:status:GetCostEstimationResponse' :: Maybe CostEstimationStatus
status =
Maybe CostEstimationStatus
forall a. Maybe a
Prelude.Nothing,
$sel:resourceCollection:GetCostEstimationResponse' :: Maybe CostEstimationResourceCollectionFilter
resourceCollection = Maybe CostEstimationResourceCollectionFilter
forall a. Maybe a
Prelude.Nothing,
$sel:timeRange:GetCostEstimationResponse' :: Maybe CostEstimationTimeRange
timeRange = Maybe CostEstimationTimeRange
forall a. Maybe a
Prelude.Nothing,
$sel:costs:GetCostEstimationResponse' :: Maybe [ServiceResourceCost]
costs = Maybe [ServiceResourceCost]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetCostEstimationResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:totalCost:GetCostEstimationResponse' :: Maybe Double
totalCost = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetCostEstimationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getCostEstimationResponse_status :: Lens.Lens' GetCostEstimationResponse (Prelude.Maybe CostEstimationStatus)
getCostEstimationResponse_status :: (Maybe CostEstimationStatus -> f (Maybe CostEstimationStatus))
-> GetCostEstimationResponse -> f GetCostEstimationResponse
getCostEstimationResponse_status = (GetCostEstimationResponse -> Maybe CostEstimationStatus)
-> (GetCostEstimationResponse
-> Maybe CostEstimationStatus -> GetCostEstimationResponse)
-> Lens
GetCostEstimationResponse
GetCostEstimationResponse
(Maybe CostEstimationStatus)
(Maybe CostEstimationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostEstimationResponse' {Maybe CostEstimationStatus
status :: Maybe CostEstimationStatus
$sel:status:GetCostEstimationResponse' :: GetCostEstimationResponse -> Maybe CostEstimationStatus
status} -> Maybe CostEstimationStatus
status) (\s :: GetCostEstimationResponse
s@GetCostEstimationResponse' {} Maybe CostEstimationStatus
a -> GetCostEstimationResponse
s {$sel:status:GetCostEstimationResponse' :: Maybe CostEstimationStatus
status = Maybe CostEstimationStatus
a} :: GetCostEstimationResponse)
getCostEstimationResponse_resourceCollection :: Lens.Lens' GetCostEstimationResponse (Prelude.Maybe CostEstimationResourceCollectionFilter)
getCostEstimationResponse_resourceCollection :: (Maybe CostEstimationResourceCollectionFilter
-> f (Maybe CostEstimationResourceCollectionFilter))
-> GetCostEstimationResponse -> f GetCostEstimationResponse
getCostEstimationResponse_resourceCollection = (GetCostEstimationResponse
-> Maybe CostEstimationResourceCollectionFilter)
-> (GetCostEstimationResponse
-> Maybe CostEstimationResourceCollectionFilter
-> GetCostEstimationResponse)
-> Lens
GetCostEstimationResponse
GetCostEstimationResponse
(Maybe CostEstimationResourceCollectionFilter)
(Maybe CostEstimationResourceCollectionFilter)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostEstimationResponse' {Maybe CostEstimationResourceCollectionFilter
resourceCollection :: Maybe CostEstimationResourceCollectionFilter
$sel:resourceCollection:GetCostEstimationResponse' :: GetCostEstimationResponse
-> Maybe CostEstimationResourceCollectionFilter
resourceCollection} -> Maybe CostEstimationResourceCollectionFilter
resourceCollection) (\s :: GetCostEstimationResponse
s@GetCostEstimationResponse' {} Maybe CostEstimationResourceCollectionFilter
a -> GetCostEstimationResponse
s {$sel:resourceCollection:GetCostEstimationResponse' :: Maybe CostEstimationResourceCollectionFilter
resourceCollection = Maybe CostEstimationResourceCollectionFilter
a} :: GetCostEstimationResponse)
getCostEstimationResponse_timeRange :: Lens.Lens' GetCostEstimationResponse (Prelude.Maybe CostEstimationTimeRange)
getCostEstimationResponse_timeRange :: (Maybe CostEstimationTimeRange
-> f (Maybe CostEstimationTimeRange))
-> GetCostEstimationResponse -> f GetCostEstimationResponse
getCostEstimationResponse_timeRange = (GetCostEstimationResponse -> Maybe CostEstimationTimeRange)
-> (GetCostEstimationResponse
-> Maybe CostEstimationTimeRange -> GetCostEstimationResponse)
-> Lens
GetCostEstimationResponse
GetCostEstimationResponse
(Maybe CostEstimationTimeRange)
(Maybe CostEstimationTimeRange)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostEstimationResponse' {Maybe CostEstimationTimeRange
timeRange :: Maybe CostEstimationTimeRange
$sel:timeRange:GetCostEstimationResponse' :: GetCostEstimationResponse -> Maybe CostEstimationTimeRange
timeRange} -> Maybe CostEstimationTimeRange
timeRange) (\s :: GetCostEstimationResponse
s@GetCostEstimationResponse' {} Maybe CostEstimationTimeRange
a -> GetCostEstimationResponse
s {$sel:timeRange:GetCostEstimationResponse' :: Maybe CostEstimationTimeRange
timeRange = Maybe CostEstimationTimeRange
a} :: GetCostEstimationResponse)
getCostEstimationResponse_costs :: Lens.Lens' GetCostEstimationResponse (Prelude.Maybe [ServiceResourceCost])
getCostEstimationResponse_costs :: (Maybe [ServiceResourceCost] -> f (Maybe [ServiceResourceCost]))
-> GetCostEstimationResponse -> f GetCostEstimationResponse
getCostEstimationResponse_costs = (GetCostEstimationResponse -> Maybe [ServiceResourceCost])
-> (GetCostEstimationResponse
-> Maybe [ServiceResourceCost] -> GetCostEstimationResponse)
-> Lens' GetCostEstimationResponse (Maybe [ServiceResourceCost])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostEstimationResponse' {Maybe [ServiceResourceCost]
costs :: Maybe [ServiceResourceCost]
$sel:costs:GetCostEstimationResponse' :: GetCostEstimationResponse -> Maybe [ServiceResourceCost]
costs} -> Maybe [ServiceResourceCost]
costs) (\s :: GetCostEstimationResponse
s@GetCostEstimationResponse' {} Maybe [ServiceResourceCost]
a -> GetCostEstimationResponse
s {$sel:costs:GetCostEstimationResponse' :: Maybe [ServiceResourceCost]
costs = Maybe [ServiceResourceCost]
a} :: GetCostEstimationResponse) ((Maybe [ServiceResourceCost] -> f (Maybe [ServiceResourceCost]))
-> GetCostEstimationResponse -> f GetCostEstimationResponse)
-> ((Maybe [ServiceResourceCost]
-> f (Maybe [ServiceResourceCost]))
-> Maybe [ServiceResourceCost] -> f (Maybe [ServiceResourceCost]))
-> (Maybe [ServiceResourceCost] -> f (Maybe [ServiceResourceCost]))
-> GetCostEstimationResponse
-> f GetCostEstimationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ServiceResourceCost]
[ServiceResourceCost]
[ServiceResourceCost]
[ServiceResourceCost]
-> Iso
(Maybe [ServiceResourceCost])
(Maybe [ServiceResourceCost])
(Maybe [ServiceResourceCost])
(Maybe [ServiceResourceCost])
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
[ServiceResourceCost]
[ServiceResourceCost]
[ServiceResourceCost]
[ServiceResourceCost]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getCostEstimationResponse_nextToken :: Lens.Lens' GetCostEstimationResponse (Prelude.Maybe Prelude.Text)
getCostEstimationResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetCostEstimationResponse -> f GetCostEstimationResponse
getCostEstimationResponse_nextToken = (GetCostEstimationResponse -> Maybe Text)
-> (GetCostEstimationResponse
-> Maybe Text -> GetCostEstimationResponse)
-> Lens' GetCostEstimationResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostEstimationResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetCostEstimationResponse' :: GetCostEstimationResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetCostEstimationResponse
s@GetCostEstimationResponse' {} Maybe Text
a -> GetCostEstimationResponse
s {$sel:nextToken:GetCostEstimationResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetCostEstimationResponse)
getCostEstimationResponse_totalCost :: Lens.Lens' GetCostEstimationResponse (Prelude.Maybe Prelude.Double)
getCostEstimationResponse_totalCost :: (Maybe Double -> f (Maybe Double))
-> GetCostEstimationResponse -> f GetCostEstimationResponse
getCostEstimationResponse_totalCost = (GetCostEstimationResponse -> Maybe Double)
-> (GetCostEstimationResponse
-> Maybe Double -> GetCostEstimationResponse)
-> Lens
GetCostEstimationResponse
GetCostEstimationResponse
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostEstimationResponse' {Maybe Double
totalCost :: Maybe Double
$sel:totalCost:GetCostEstimationResponse' :: GetCostEstimationResponse -> Maybe Double
totalCost} -> Maybe Double
totalCost) (\s :: GetCostEstimationResponse
s@GetCostEstimationResponse' {} Maybe Double
a -> GetCostEstimationResponse
s {$sel:totalCost:GetCostEstimationResponse' :: Maybe Double
totalCost = Maybe Double
a} :: GetCostEstimationResponse)
getCostEstimationResponse_httpStatus :: Lens.Lens' GetCostEstimationResponse Prelude.Int
getCostEstimationResponse_httpStatus :: (Int -> f Int)
-> GetCostEstimationResponse -> f GetCostEstimationResponse
getCostEstimationResponse_httpStatus = (GetCostEstimationResponse -> Int)
-> (GetCostEstimationResponse -> Int -> GetCostEstimationResponse)
-> Lens GetCostEstimationResponse GetCostEstimationResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostEstimationResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetCostEstimationResponse' :: GetCostEstimationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetCostEstimationResponse
s@GetCostEstimationResponse' {} Int
a -> GetCostEstimationResponse
s {$sel:httpStatus:GetCostEstimationResponse' :: Int
httpStatus = Int
a} :: GetCostEstimationResponse)
instance Prelude.NFData GetCostEstimationResponse