{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CostExplorer.Types.TerminateRecommendationDetail where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TerminateRecommendationDetail = TerminateRecommendationDetail'
{
TerminateRecommendationDetail -> Maybe Text
currencyCode :: Prelude.Maybe Prelude.Text,
TerminateRecommendationDetail -> Maybe Text
estimatedMonthlySavings :: Prelude.Maybe Prelude.Text
}
deriving (TerminateRecommendationDetail
-> TerminateRecommendationDetail -> Bool
(TerminateRecommendationDetail
-> TerminateRecommendationDetail -> Bool)
-> (TerminateRecommendationDetail
-> TerminateRecommendationDetail -> Bool)
-> Eq TerminateRecommendationDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TerminateRecommendationDetail
-> TerminateRecommendationDetail -> Bool
$c/= :: TerminateRecommendationDetail
-> TerminateRecommendationDetail -> Bool
== :: TerminateRecommendationDetail
-> TerminateRecommendationDetail -> Bool
$c== :: TerminateRecommendationDetail
-> TerminateRecommendationDetail -> Bool
Prelude.Eq, ReadPrec [TerminateRecommendationDetail]
ReadPrec TerminateRecommendationDetail
Int -> ReadS TerminateRecommendationDetail
ReadS [TerminateRecommendationDetail]
(Int -> ReadS TerminateRecommendationDetail)
-> ReadS [TerminateRecommendationDetail]
-> ReadPrec TerminateRecommendationDetail
-> ReadPrec [TerminateRecommendationDetail]
-> Read TerminateRecommendationDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TerminateRecommendationDetail]
$creadListPrec :: ReadPrec [TerminateRecommendationDetail]
readPrec :: ReadPrec TerminateRecommendationDetail
$creadPrec :: ReadPrec TerminateRecommendationDetail
readList :: ReadS [TerminateRecommendationDetail]
$creadList :: ReadS [TerminateRecommendationDetail]
readsPrec :: Int -> ReadS TerminateRecommendationDetail
$creadsPrec :: Int -> ReadS TerminateRecommendationDetail
Prelude.Read, Int -> TerminateRecommendationDetail -> ShowS
[TerminateRecommendationDetail] -> ShowS
TerminateRecommendationDetail -> String
(Int -> TerminateRecommendationDetail -> ShowS)
-> (TerminateRecommendationDetail -> String)
-> ([TerminateRecommendationDetail] -> ShowS)
-> Show TerminateRecommendationDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TerminateRecommendationDetail] -> ShowS
$cshowList :: [TerminateRecommendationDetail] -> ShowS
show :: TerminateRecommendationDetail -> String
$cshow :: TerminateRecommendationDetail -> String
showsPrec :: Int -> TerminateRecommendationDetail -> ShowS
$cshowsPrec :: Int -> TerminateRecommendationDetail -> ShowS
Prelude.Show, (forall x.
TerminateRecommendationDetail
-> Rep TerminateRecommendationDetail x)
-> (forall x.
Rep TerminateRecommendationDetail x
-> TerminateRecommendationDetail)
-> Generic TerminateRecommendationDetail
forall x.
Rep TerminateRecommendationDetail x
-> TerminateRecommendationDetail
forall x.
TerminateRecommendationDetail
-> Rep TerminateRecommendationDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TerminateRecommendationDetail x
-> TerminateRecommendationDetail
$cfrom :: forall x.
TerminateRecommendationDetail
-> Rep TerminateRecommendationDetail x
Prelude.Generic)
newTerminateRecommendationDetail ::
TerminateRecommendationDetail
newTerminateRecommendationDetail :: TerminateRecommendationDetail
newTerminateRecommendationDetail =
TerminateRecommendationDetail' :: Maybe Text -> Maybe Text -> TerminateRecommendationDetail
TerminateRecommendationDetail'
{ $sel:currencyCode:TerminateRecommendationDetail' :: Maybe Text
currencyCode =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:estimatedMonthlySavings:TerminateRecommendationDetail' :: Maybe Text
estimatedMonthlySavings = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
terminateRecommendationDetail_currencyCode :: Lens.Lens' TerminateRecommendationDetail (Prelude.Maybe Prelude.Text)
terminateRecommendationDetail_currencyCode :: (Maybe Text -> f (Maybe Text))
-> TerminateRecommendationDetail -> f TerminateRecommendationDetail
terminateRecommendationDetail_currencyCode = (TerminateRecommendationDetail -> Maybe Text)
-> (TerminateRecommendationDetail
-> Maybe Text -> TerminateRecommendationDetail)
-> Lens
TerminateRecommendationDetail
TerminateRecommendationDetail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TerminateRecommendationDetail' {Maybe Text
currencyCode :: Maybe Text
$sel:currencyCode:TerminateRecommendationDetail' :: TerminateRecommendationDetail -> Maybe Text
currencyCode} -> Maybe Text
currencyCode) (\s :: TerminateRecommendationDetail
s@TerminateRecommendationDetail' {} Maybe Text
a -> TerminateRecommendationDetail
s {$sel:currencyCode:TerminateRecommendationDetail' :: Maybe Text
currencyCode = Maybe Text
a} :: TerminateRecommendationDetail)
terminateRecommendationDetail_estimatedMonthlySavings :: Lens.Lens' TerminateRecommendationDetail (Prelude.Maybe Prelude.Text)
terminateRecommendationDetail_estimatedMonthlySavings :: (Maybe Text -> f (Maybe Text))
-> TerminateRecommendationDetail -> f TerminateRecommendationDetail
terminateRecommendationDetail_estimatedMonthlySavings = (TerminateRecommendationDetail -> Maybe Text)
-> (TerminateRecommendationDetail
-> Maybe Text -> TerminateRecommendationDetail)
-> Lens
TerminateRecommendationDetail
TerminateRecommendationDetail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TerminateRecommendationDetail' {Maybe Text
estimatedMonthlySavings :: Maybe Text
$sel:estimatedMonthlySavings:TerminateRecommendationDetail' :: TerminateRecommendationDetail -> Maybe Text
estimatedMonthlySavings} -> Maybe Text
estimatedMonthlySavings) (\s :: TerminateRecommendationDetail
s@TerminateRecommendationDetail' {} Maybe Text
a -> TerminateRecommendationDetail
s {$sel:estimatedMonthlySavings:TerminateRecommendationDetail' :: Maybe Text
estimatedMonthlySavings = Maybe Text
a} :: TerminateRecommendationDetail)
instance Core.FromJSON TerminateRecommendationDetail where
parseJSON :: Value -> Parser TerminateRecommendationDetail
parseJSON =
String
-> (Object -> Parser TerminateRecommendationDetail)
-> Value
-> Parser TerminateRecommendationDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TerminateRecommendationDetail"
( \Object
x ->
Maybe Text -> Maybe Text -> TerminateRecommendationDetail
TerminateRecommendationDetail'
(Maybe Text -> Maybe Text -> TerminateRecommendationDetail)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> TerminateRecommendationDetail)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CurrencyCode")
Parser (Maybe Text -> TerminateRecommendationDetail)
-> Parser (Maybe Text) -> Parser TerminateRecommendationDetail
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EstimatedMonthlySavings")
)
instance
Prelude.Hashable
TerminateRecommendationDetail
instance Prelude.NFData TerminateRecommendationDetail